package cn.xiaye.blog.servlet;

import java.util.List;

import cn.xiaye.blog.bean.Context;
import cn.xiaye.blog.bean.Sort;
import cn.xiaye.blog.dao.SortDao;
import cn.xiaye.blog.db.util.CommonUtil;

@SuppressWarnings("serial")
public class ShowAddArticlePage extends FatherServlet {

	@Override
	public String excute(Context context) {
		if(!CommonUtil.isLogin(context.getSession())){
			return "login.jsp";
		}
		SortDao sortDao = new SortDao();
		List<Sort> list = sortDao.queryAll();
		context.getRequest().setAttribute("list", list);

		return "newArticle.jsp";
	}
	
}
